package com.v1.video.domain;

import android.os.Parcel;
import android.os.Parcelable;

import com.v1.video.option.db.SetMessageCommentInfo;
import com.v1.video.util.Logger;

public class MessageFocusInfo implements Parcelable{
	private final String TAG = "MessageFocusInfo";
    private String videoId="";
    private String commentsId = "";
    private String comments;
    private String createTime;
    private String userId;
    private String userName="";
    private String userImg ="";//相对路径，使用时需要增加全局的网址
    private String replyUserId;
    private String replyUserName;
    private String praiseCont;
    private String video_url;
    private String title;
    private String img_url;
    private String detail;
    public String href = ""; //新闻的视频详情页的链接
    public String stype = ""; //0表示新闻的视频1表示拍客的视频
    public String sex = "";
//    private String userId;
    private String focusUserId;//当为圈子时，用以表示圈子id
    private String focusUserName;//当为圈子时，用以表示圈子名称
    private String focusUserImg ="";//当为圈子时，用以表示本条消息的id
    private String focusUserSex;////当为圈子时，用以表示审核的状态0没有操作1通过2忽略
    private String details;
    private String userType;//0普通 1达人
    /**消息状态 3表示圈子审核 那块做过操作了，目前除了 未读 ，已读 ，就圈子审核那块有用*/
	private String messageStatus;//
	private String messageId;//
	private String isCertification;
    public int type = 0;//0表示评论1表示关注本字段，服务器不下发，本地根据数据判断赋值；2,3,4,5,6,7,8
//    private String createTime;
    /**状态 ：0未读，1已读*/
    private int state = 0;
    
    public MessageFocusInfo(){
        
    }
    
    public MessageFocusInfo(SettingMessageInfo msgInfo){
        this.videoId = msgInfo.getVideoId();
        this.commentsId = msgInfo.getCommentsId();
        this.comments = msgInfo.getComments();
        this.createTime = msgInfo.getCreateTime();
        this.userId = msgInfo.getUserId();
        this.userName = msgInfo.getUserName();
        this.userImg = msgInfo.getUserImg();
        this.replyUserId = msgInfo.getReplyUserId();
        this.replyUserName = msgInfo.getReplyUserName();
        this.praiseCont = msgInfo.getPraiseCont();
        this.video_url = msgInfo.getVideo_url();
        this.title = msgInfo.getTitle();
        this.detail = msgInfo.getDetail();
        this.img_url = msgInfo.getImg_url();        
        this.details = msgInfo.getDetails();        
        this.href = msgInfo.href;
        this.stype = msgInfo.stype;
        this.sex = msgInfo.sex;
        this.focusUserSex = msgInfo.getFocusUserSex();
        this.type = msgInfo.type;
        this.focusUserId = msgInfo.getFocusUserId();
        this.focusUserName = msgInfo.getFocusUserName();
        this.focusUserImg = msgInfo.getFocusUserImg();
        this.userType = msgInfo.getUserType();
        this.isCertification = msgInfo.getIsCertification();
        if(msgInfo.getMessageType().equals("1")){
        	type = 0;//本地0为评论
        }else if(msgInfo.getMessageType().equals("2")){//关注
        	type = 1;
        }else if(msgInfo.getMessageType().equals("3")){//取消关注
        	type = 2;
        }else if(msgInfo.getMessageType().equals("4")){//@我的消息
        	type = 3;
        	Logger.i(TAG, "msgInfo.getFromUserId()=="+msgInfo.getFromUserId());
        	this.replyUserId = msgInfo.getFromUserId();
        	this.userId = msgInfo.getFromUserId();
        	this.userName = msgInfo.getFromUserName();
        	this.userImg = msgInfo.getFromUserImg();
        	this.videoId = msgInfo.getMessageVideoId();
        	this.video_url = msgInfo.getMessageVideoUrl();
        	this.img_url = msgInfo.getMessageVideoImgUrl();        	
        	
        }else if(msgInfo.getMessageType().equals("5")){//圈子申请消息
        	type = 4;
        	this.replyUserId = msgInfo.getFromUserId();
        	this.userName = msgInfo.getFromUserName();
        	this.userImg = msgInfo.getFromUserImg();
        	this.details = msgInfo.getMessageDetails();
        	this.focusUserId = msgInfo.getGroupId();
            this.focusUserName = msgInfo.getGroupName();
            this.focusUserImg = msgInfo.getMessageId();
            this.focusUserSex = "0";
            this.messageStatus = msgInfo.getMessageStatus();
            this.messageId = msgInfo.getMessageId();
        }else if(msgInfo.getMessageType().equals("6")){//圈子邀请消息
        	type = 5;
        	this.replyUserId = msgInfo.getFromUserId();
        	this.userName = msgInfo.getFromUserName();
        	this.userImg = msgInfo.getFromUserImg();
        	this.details = msgInfo.getMessageDetails();
        	this.focusUserId = msgInfo.getGroupId();
            this.focusUserName = msgInfo.getGroupName();
            this.focusUserImg = msgInfo.getMessageId();
        }else if(msgInfo.getMessageType().equals("7")){//圈子删除消息
        	type = 6;
        	this.replyUserId = msgInfo.getFromUserId();
        	this.userName = msgInfo.getFromUserName();
        	this.userImg = msgInfo.getFromUserImg();
        	this.details = msgInfo.getMessageDetails();
        	this.focusUserId = msgInfo.getGroupId();
            this.focusUserName = msgInfo.getGroupName();
            this.focusUserImg = msgInfo.getMessageId();
        }else if(msgInfo.getMessageType().equals("8")){//圈子退出消息
        	type = 7;
        	this.replyUserId = msgInfo.getFromUserId();
        	this.userName = msgInfo.getFromUserName();
        	this.userImg = msgInfo.getFromUserImg();
        	this.details = msgInfo.getMessageDetails();
        	this.focusUserId = msgInfo.getGroupId();
            this.focusUserName = msgInfo.getGroupName();
            this.focusUserImg = msgInfo.getMessageId();
        }else if(msgInfo.getMessageType().equals("9")){//圈子审核通过消息
        	type = 8;
        	this.replyUserId = msgInfo.getFromUserId();
        	this.userName = msgInfo.getFromUserName();
        	this.userImg = msgInfo.getFromUserImg();
        	this.details = msgInfo.getMessageDetails();
        	this.focusUserId = msgInfo.getGroupId();
            this.focusUserName = msgInfo.getGroupName();
            this.focusUserImg = msgInfo.getMessageId();
        }else if(msgInfo.getMessageType().equals("10")){//圈子置为私密圈消息
        	type = 9;
        	this.replyUserId = msgInfo.getFromUserId();
        	this.userName = msgInfo.getFromUserName();
        	this.userImg = msgInfo.getFromUserImg();
        	this.details = msgInfo.getMessageDetails();
        	this.focusUserId = msgInfo.getGroupId();
            this.focusUserName = msgInfo.getGroupName();
            this.focusUserImg = msgInfo.getMessageId();
        }else if(msgInfo.getMessageType().equals("11")){//圈子置为公开圈消息        	
        	type = 10;
        	this.replyUserId = msgInfo.getFromUserId();
        	this.userName = msgInfo.getFromUserName();
        	this.userImg = msgInfo.getFromUserImg();
        	this.details = msgInfo.getMessageDetails();
        	this.focusUserId = msgInfo.getGroupId();
            this.focusUserName = msgInfo.getGroupName();
            this.focusUserImg = msgInfo.getMessageId();
        }else if(msgInfo.getMessageType().equals("12")){//圈子解散消息
        	type = 11;        	
        	this.replyUserId = msgInfo.getFromUserId();
        	this.userName = msgInfo.getFromUserName();
        	this.userImg = msgInfo.getFromUserImg();
        	this.details = msgInfo.getMessageDetails();
        	this.focusUserId = msgInfo.getGroupId();
            this.focusUserName = msgInfo.getGroupName();
            this.focusUserImg = msgInfo.getMessageId();
        }else if(msgInfo.getMessageType().equals("13")){//谁加入了你创建的圈子，该圈不需要审核
        	type = 12;
        	this.replyUserId = msgInfo.getFromUserId();
        	this.userName = msgInfo.getFromUserName();
        	this.userImg = msgInfo.getFromUserImg();
        	this.details = msgInfo.getMessageDetails();
        	this.focusUserId = msgInfo.getGroupId();
            this.focusUserName = msgInfo.getGroupName();
            this.focusUserImg = msgInfo.getMessageId();
        }else if(msgInfo.getMessageType().equals("22")){//私信
        	type = 13;
        	this.replyUserId = msgInfo.getFromUserId();
        	this.userName = msgInfo.getFromUserName();
        	this.userImg = msgInfo.getFromUserImg();
        	this.details = msgInfo.getMessageDetails();
        	this.focusUserId = msgInfo.getToUserId();
        	
        }
    }
    
    public MessageFocusInfo(SetMessageCommentInfo commInfo){
        this.videoId = commInfo.videoId;
        this.commentsId = commInfo.commentsId;
        this.comments = commInfo.comments;
        this.createTime = commInfo.createTime;
        this.userId = commInfo.userId;
        this.userName = commInfo.userName;
        this.userImg = commInfo.userImg;
        this.replyUserId = commInfo.replyUserId;
        this.replyUserName = commInfo.replyUserName;
        this.praiseCont = commInfo.praiseCont;
        this.video_url = commInfo.video_url;
        this.title = commInfo.title;
        this.detail = commInfo.detail;
        this.img_url = commInfo.img_url;        
        this.details = commInfo.details;
        this.state = commInfo.state;
        this.href = commInfo.href;
        this.stype = commInfo.stype;
        this.sex = commInfo.sex;
        this.focusUserSex = commInfo.focusUserSex;
        this.type = commInfo.type;
        this.focusUserId = commInfo.focusUserId;
        this.focusUserName = commInfo.focusUserName;
        this.focusUserImg = commInfo.focusUserImg;        
    }
    
    public String getIsCertification() {
		return isCertification;
	}

	public void setIsCertification(String isCertification) {
		this.isCertification = isCertification;
	}

	public String getCreateTime() {
        return createTime;
    }
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
    public String getUserId() {
        return userId;
    }
    public void setUserId(String userId) {
        this.userId = userId;
    }
    public String getFocusUserId() {
        return focusUserId;
    }
    public void setFocusUserId(String focusUserId) {
        this.focusUserId = focusUserId;
    }
    public String getFocusUserName() {
        return focusUserName;
    }
    public void setFocusUserName(String focusUserName) {
        this.focusUserName = focusUserName;
    }
    public String getFocusUserImg() {
        return focusUserImg;
    }
    public void setFocusUserImg(String focusUserImg) {
        this.focusUserImg = focusUserImg;
    }
    public String getDetails() {
        return details;
    }
    public void setDetails(String details) {
        this.details = details;
    }
    public String getVideoId() {
        return videoId;
    }
    public void setVideoId(String videoId) {
        this.videoId = videoId;
    }
    public String getCommentsId() {
        return commentsId;
    }
    public void setCommentsId(String commentsId) {
        this.commentsId = commentsId;
    }
    public String getComments() {
        return comments;
    }
    public void setComments(String comments) {
        this.comments = comments;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getUserImg() {
        return userImg;
    }
    public void setUserImg(String userImg) {
        this.userImg = userImg;
    }
    public String getReplyUserId() {
        return replyUserId;
    }
    public void setReplyUserId(String replyUserId) {
        this.replyUserId = replyUserId;
    }
    public String getReplyUserName() {
        return replyUserName;
    }
    public void setReplyUserName(String replyUserName) {
        this.replyUserName = replyUserName;
    }
    public String getPraiseCont() {
        return praiseCont;
    }
    public void setPraiseCont(String praiseCont) {
        this.praiseCont = praiseCont;
    }
    public String getVideo_url() {
        return video_url;
    }
    public void setVideo_url(String video_url) {
        this.video_url = video_url;
    }
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
    public String getImg_url() {
        return img_url;
    }
    public void setImg_url(String img_url) {
        this.img_url = img_url;
    }
    public String getDetail() {
        return detail;
    }
    public void setDetail(String detail) {
        this.detail = detail;
    }
    
    public String getHref() {
        return href;
    }

    public void setHref(String href) {
        this.href = href;
    }

    public String getStype() {
        return stype;
    }

    public void setStype(String stype) {
        this.stype = stype;
    }
    
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getFocusUserSex() {
        return focusUserSex;
    }

    public void setFocusUserSex(String focusUserSex) {
        this.focusUserSex = focusUserSex;
    }
    

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }    

	@Override
    public int describeContents() {
        // TODO Auto-generated method stub
        return 0;
    }
    @Override
    public void writeToParcel(Parcel arg0, int arg1) {
        // TODO Auto-generated method stub
    }

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public String getMessageStatus() {
		return messageStatus;
	}

	public void setMessageStatus(String messageStatus) {
		this.messageStatus = messageStatus;
	}

	public String getMessageId() {
		return messageId;
	}

	public void setMessageId(String messageId) {
		this.messageId = messageId;
	}
    
}
